From ee79b7cdcc51ce281fd98059f7dbd203e0500054 Mon Sep 17 00:00:00 2001 From: Justin Charette Date: Sun, 14 May 2017 17:33:33 -0400 Subject: [PATCH] Update documentation: cargo does not build src/bin/*.rs when toml contains [[bin]] Signed-off-by: Justin Charette --- src/doc/manifest.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/doc/manifest.md b/src/doc/manifest.md index 29ee40262..b3484e58e 100644 --- a/src/doc/manifest.md +++ b/src/doc/manifest.md @@ -443,7 +443,11 @@ Most of the time workspaces will not need to be dealt with as `cargo new` and If your project is an executable, name the main source file `src/main.rs`. If it is a library, name the main source file `src/lib.rs`. -Cargo will also treat any files located in `src/bin/*.rs` as executables. +Cargo will also treat any files located in `src/bin/*.rs` as executables. Do +note, however, once you add a `[[bin]]` section ([see +below](#configuring-a-target)), Cargo will no longer automatically build files +located in `src/bin/*.rs`. Instead you must create a `[[bin]]` section for +each file you want to build. Your project can optionally contain folders named `examples`, `tests`, and `benches`, which Cargo will treat as containing examples, -- 2.30.2